package org.zoomdev.zoom.dao.structs;

import org.zoomdev.zoom.dao.Dao;
import org.zoomdev.zoom.dao.DatabaseStruct;
import org.zoomdev.zoom.dao.Databases;
import org.zoomdev.zoom.dao.structs.impl.H2DatabaseStruct;
import org.zoomdev.zoom.dao.structs.impl.MysqlDatabaseStruct;

public class DatabaseStructFactory {

    public static DatabaseStruct create(Dao dao, String productName, String databaseName) {
        if (Databases.MYSQL.equals(productName)) {
            return new MysqlDatabaseStruct(dao, databaseName);
        }
        if (Databases.H2.equals(productName)) {
            return new H2DatabaseStruct(dao, databaseName);
        }
        return null;
    }
}
